package com.sure.supermarketserver.sell.order;

import com.sure.supermarketserver.common.Result;
<<<<<<< HEAD
import org.springframework.web.bind.annotation.*;
=======
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
>>>>>>> 5f10f6198a25dcc9a1d966785717ca9d10c0d8ba

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/sell/order")
public class OrderAPI {

    @Resource
    private OrderService orderService;
    @GetMapping("/details")
    public Result orderDetails(OrderDto dto){
        Map<String,Object> page =orderService.findOrderDetails(dto);
        return Result.success(page);
    }

    @GetMapping("")
    public Result orderList(OrderDto dto){
        Map<String,Object> page = orderService.findOrderList(dto);
        return Result.success(page);
    }
}
